Skip to content

feat(surfaces): computed comparisons, Toggle label, Table hideOnPhone, minDigits - #15

Merged
Madraka merged 1 commit into
mainfrom
feat/surface-gaps-newsroom
Oct 20, 2026
Merged

Madraka merged 1 commit into
mainfrom
feat/surface-gaps-newsroom

Conversation

@Madraka

@Madraka Madraka commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Four surface gaps found while building interactive articles on the newsroom (RFC-0022, after 22e). Ported from an uncommitted worktree on the pre-public history; none were on main yet.

  • Computed comparisons: a visible condition or if's cond takes a call as an operand ({"lt":[{"call":"calculate",…},{"call":"calculate",…}]}), within the 8-deep nesting and 500-call limits, on the server and in the runtime. evaluateCondition takes an optional ResolveContext; checkCondition's exported signature is unchanged.
  • Toggle label: a labelled Toggle renders a <fieldset> with a visible <legend>, as RadioGroup does.
  • Table hideOnPhone: the column (never the first) gets data-phone="hide" and leaves the phone card; the blog theme and the preview CSS have the rule.
  • formatNumber minDigits: keeps trailing zeros (9.60).
  • The runtime is surface.11.js; surface.10.js joins the aliases. The catalog prompt, the site-design recipes and RFC-0022 describe the new vocabulary.

Tests

  • New core-ts tests (operands, limits, minDigits, prompt); runtime parity test gets 6 values and 7 conditions; Toggle and Table render tests.
  • pnpm check: lint, size ratchet, typecheck and every package green. Studio failed once under machine load (load ~12: setup hook timeouts) and on a solo rerun had one other flaky test, which then passed alone. No Studio code is touched.

🤖 Generated with Claude Code

…, minDigits

Four surface gaps found while building interactive articles on the
newsroom (RFC-0022, after 22e):

- a `visible` condition or `if`'s `cond` takes a call as an operand,
  within the same nesting and call limits; `evaluateCondition` takes an
  optional ResolveContext
- a labelled Toggle renders a fieldset with a visible legend
- Table columns take `hideOnPhone` (never the first column); the blog
  theme and the preview hide them in the phone card
- formatNumber takes `minDigits` for trailing zeros (9.60)

The runtime is now surface.11.js; surface.10.js joins the aliases.
Ported from an uncommitted worktree based on the pre-public history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madraka <asker_17@msn.com>
Copilot AI balanced review requested due to automatic review settings October 20, 2026 13:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Madraka
Madraka merged commit 680d4d2 into main Oct 20, 2026
5 checks passed
@Madraka Madraka mentioned this pull request Oct 20, 2026
Madraka added a commit that referenced this pull request Oct 20, 2026
feat(surfaces): computed comparisons, Toggle label, Table hideOnPhone, minDigits
Madraka added a commit that referenced this pull request Oct 20, 2026
Deploy from Cloudflare Workers Builds (#17), one-click page publish in
Studio (#14), computed values in surface conditions (#15), a 30 s Chrome
start (#16).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
@Madraka
Madraka deleted the feat/surface-gaps-newsroom branch October 20, 2026 21:35
Madraka added a commit that referenced this pull request Nov 11, 2026
…ard (PR #205 review)

- A (#5, #3, #6, #7): the definitions and collections anchors read the
  fragment's stored text when planned (checked against the planned Site,
  else ConflictError) and compare that text at batch time, so a site row
  stored verbatim anchors like any other. The canonical-rows job and its
  local-open run are removed: nothing depends on canonical site rows.
- B (#2, #4): in a site with reference fields every entry write carries the
  definitions anchor (status-only publishes included); the shared subquery
  only matches reference and repeater definitions, so a retyped key fails
  the batch.
- C (#0): usable members are one json_each count over the needed collection
  lists (six parameters, per-pair semantics kept).
- D (#8, #15): the list-values fingerprint format moves to 2, so rows built
  under the old readsOriginal rebuild once.
- E (#16): a referrer write naming an entry outside the field's collections
  is unknown_entry (422); reference_target_moved stays the move's 409.
- F (#12): a reference sub-field added over a key stored items hold is
  field_key_in_use, counted and guarded on the site CAS.
- G (#1): racing cases for the R3 narrowing in both orders, R13 for a move
  and a group change, the #2 interleaving, a verbatim site row, 22 blocking
  pairs, and SQL tests of the shared subquery.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants